/**
 * Created by yvdedu.com on 2016/11/12.
 */
function cpd(){
    var op=$("#pwd").val();
    var npwd=$("#npwd").val();
    var cpwd=$("#cpwd").val();
    if(npwd!=cpwd){
        alert("两次密码不一致！");
        return;
    }else if(!npwd.match(/[a-zA-Z]/)||!npwd.match(/\\d/)||npwd.length<8){
        alert("密码必须包含字母和数字并且长度至少8位")
        return;
    }
    $.post("/changePwd",{oldPwd:op,newPwd:npwd},function(o){
        alert(o);
    });
}